<template>
   <el-menu
        :style="{width:!isCollapse? '168px':'64px'}"
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="aside-contan"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose"
        :collapse="isCollapse"
        :default-active="menuActive"
      >
        <p class="logo-lg">{{!isCollapse?'安康同行':'安行'}}</p>
        <TreeMenu :index="1" :routerList = "routerList"/>
      </el-menu>
 </template>
 
 <script setup>
    import TreeMenu from './treeMenu.vue';
    import {useMenuStore} from '../stores/menuStore'
    import { storeToRefs } from "pinia";
    //pinia状态管理
    const menuStore = useMenuStore() 
    const {routerList,menuActive,isCollapse} = storeToRefs(menuStore)
     const handleOpen = ()=>{}
     const handleClose = ()=>{}
 
 </script>
 
 <style scoped lang="less">
.aside-contan{
  height: 100%;
  .logo-lg{
    font-size: 20px;
    text-align: center;
    height: 50px;
    line-height: 50px;
    color: #fff;
  }
}
 
 </style>